home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / lib2to3 / fixes / fix_long.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  926 b   |  20 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. """Fixer that turns 'long' into 'int' everywhere.
  5. """
  6. from  import fixer_base
  7. from fixer_util import Name, Number, is_probably_builtin
  8.  
  9. class FixLong(fixer_base.BaseFix):
  10.     PATTERN = "'long'"
  11.     static_int = Name('int')
  12.     
  13.     def transform(self, node, results):
  14.         if is_probably_builtin(node):
  15.             new = self.static_int.clone()
  16.             new.set_prefix(node.get_prefix())
  17.             return new
  18.  
  19.  
  20.